Semiconductor image sensors are used for sensing radiation such as light. Complementary metal-oxide-semiconductor (CMOS) image sensors (CIS) and charge-coupled device (CCD) sensors are widely used in various applications such as digital still camera or mobile phone camera devices. These devices utilize an array of pixels in a substrate, including photodiodes and transistors that can absorb radiation projected toward the substrate and convert the sensed radiation into electrical signals. However, an image sensor may generate noise when a pixel in the image sensor absorbs light that is intended for another pixel. This noise may be referred to as optical cross-talk, which may degrade the performance of the image sensor. In addition, the image sensor may include devices in a periphery region of the image sensor that need to be kept optically dark. These devices in the periphery region also suffer performance degradation and may generate noise when exposed to light. The aforementioned problems are particularly pronounced for a back side illuminated image sensor. Thus, while existing methods of fabricating image sensors have been generally adequate for their intended purposes, they have not been entirely satisfactory in every aspect.